<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<script>
function valid_form()
{
	var userName=document.getElementById('userName').value;
	var password1=document.getElementById('password1').value;
	var password2=document.getElementById('password2').value;
    if(userName=="")
    {
        alert("用户名不能为空！");
        return false;
    }else if(userName.length<6){
    	alert("用户名必须满足6-20位");
    	return false;
    }
    if(password1=="")
    {
        alert("密码不能为空！");
        return false;
    }
    if(!(password1==password2))
    {
       alert("两次密码不一致！");
       return false;
    }
}
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>register</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

     <link type="text/css" rel="stylesheet" media="all" href="css/regist.css" /> 
  </head>
  
  <body class="regist">
   <div class="regist_box" align="center">
   <form action="regist.do" name="from2" method="post">
   <table class=regist_table align="center">
     <tr>
     <td>用户名：</td>
     <td>
     <input type="text" value="" name="userName" id="userName">
     <label>6-20位</label>
     </td>
     </tr>
     <tr>
     <td>密码：</td>
     <td>
     <input type="password" value="" name="password1" id="password1">
     </td>
     </tr>
     <tr>
     <td>确认密码：</td>
     <td>
     <input type="password" value="" name="password2" id="password2">
     </td>
     </tr>
      <tr>
     <td>企业名称：</td>
     <td>
     <input type="text" value="" name="companyName" id="companyName">
     </td>
     </tr>
     <tr>
     <td>安全问题：</td>
     <td>
     <select class="SelectDefault" id="sel_Area" name="D1" id="D1"style="width:200px;">
     <option value="你最信赖的人是谁？">你最信赖的人是谁？</option><option value="你最喜欢的食物是？">你最喜欢的食物是？</option>
     <option value="对你影响最大的人是？">对你影响最大的人是？</option><option value="你最喜欢去的城市是？">你最喜欢去的城市是？</option>
     <option value="你最喜欢的一本书是？">你最喜欢的一本书是？</option><option value="你最喜欢的电影是？">你最喜欢的电影是？</option>
     </select>
     </td>
     </tr>
     <tr>
     <td>安全答案：</td>
     <td>
     <input type="text" value="" name="safeAnswer" id="safeAnswer">
     </td>
     </tr>
     <tr>
     <tr>
     <td>安全提示：</td>
     <td>
     <input type="text" value="" name="hint" id="hint">
     </td>
     </tr>
     <td>邮箱：</td>
     <td>
     <input type="text" value="" name="email" id="email">
     </td>
     </tr>
      <tr>
     <td>状态：</td>
     <td>
     <input type="text" value="" name="state" id="state">
     </td>
     </tr>
     </table>
     <table align="center" style="width: 219px; ">
     <tr>
     <td align="left" colspan="2" >
     <button type="submit" name="regist" value="注册" onclick="return valid_form()" style="width: 100px;">注册</button>
     </td>
     <td align="right" colspan="2" >
     <button type="reset" name="reset" value="重置" style="width: 100px;">重置</button>
     </td>
     </tr>
     </table>
     </form>
     </div>
   </body>
</html>
